package net.grapsus.arduino;

import org.objectweb.asm.Type;

class Function
{
	private Type[] args;
	private Type ret;

	public Function(String desc)
	{
		args = Type.getArgumentTypes(desc);
    ret = Type.getReturnType(desc);
	}

	public Type[] getArguments()
	{
		return args;
	}
	
	public Type getReturn()
	{
		return ret;
	}

	public String getDescriptor()
	{
		return Type.getMethodDescriptor(ret, args);
	}
}
